var e = require;
var t = module;
var n = exports;
Object.defineProperty(n, "__esModule", {
    value: !0
});
var o = e("NativeAd_Huawei"),
i = e("NativeAd_Oppo"),
a = e("NativeAd_Oppo_Android"),
r = e("NativeAd_Vivo"),
s = e("NativeAd_Xiaomi"),
c = cc._decorator,
l = c.ccclass,
d = c.property,
h = function(e) {
    __extends(t, e);
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        t.keyName = "nullKeyNativeProbability";
        t.nativeAdNode = null;
        t.nativeAd_Oppo = null;
        t.nativeAd_Vivo = null;
        t.nativeAd_Android_Oppo = null;
        t.nativeAd_Huawei = null;
        t.nativeAd_Xiaomi = null;
        t.nativeAd_Base = null;
        return t
    }
    t.prototype.start = function() {
        this.nativeAd_Oppo = this.nativeAdNode.getComponent(i.default);
        this.nativeAd_Vivo = this.nativeAdNode.getComponent(r.default);
        this.nativeAd_Android_Oppo = this.nativeAdNode.getComponent(a.default);
        this.nativeAd_Huawei = this.nativeAdNode.getComponent(o.default);
        this.nativeAd_Xiaomi = this.nativeAdNode.getComponent(s.default);
        SDK.Mgr.Inst.curChannel == SDK.Define.Channel.oppo ? this.nativeAd_Base = this.nativeAd_Oppo: SDK.Mgr.Inst.curChannel == SDK.Define.Channel.vivo ? this.nativeAd_Base = this.nativeAd_Vivo: SDK.Mgr.Inst.curChannel == SDK.Define.Channel.android_oppo ? this.nativeAd_Base = this.nativeAd_Android_Oppo: SDK.Mgr.Inst.curChannel == SDK.Define.Channel.huawei ? this.nativeAd_Base = this.nativeAd_Huawei: SDK.Mgr.Inst.curChannel == SDK.Define.Channel.xm && (this.nativeAd_Base = this.nativeAd_Xiaomi);
        SDK.Mgr.Inst.isAdOpen && SDK.Mgr.Inst.customData && console.log("####### keyName:" + this.keyName + "###### hasKey:" + SDK.Mgr.Inst.customData[this.keyName])
    };
    t.prototype.triggerBtnClick = function() {
        SDK.Mgr.Inst.isAdOpen && SDK.Mgr.Inst.customData && SDK.Mgr.Inst.customData[this.keyName] && Math.random() < SDK.Mgr.Inst.customData[this.keyName] && this.nativeAd_Base && this.nativeAd_Base.click()
    };
    __decorate([d(cc.String)], t.prototype, "keyName", void 0);
    __decorate([d(cc.Node)], t.prototype, "nativeAdNode", void 0);
    return __decorate([l], t)
} (cc.Component);
n.default = h